
<script src="{$static_dir}/assets/js/jquery.ztree.core.js"></script>
<script src="{$static_dir}/assets/js/jquery.ztree.excheck.js"></script>
<div class="am-u-sm-12 widget main-w">
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/menu/index')}">系统管理</a></li>
		<li><a href="{:url('/admin/role/index')}">角色</a></li>
		<li class="am-active">{$item.role_name?角色编辑:添加角色}</li>
	</ol>
	<div class="am-u-sm-12" style="padding: 40px;">
		<div class="am-u-sm-12" style="background: #fff;">
		<form class="am-form-inline tpl-form-border-form" id="addallmenu" data-check="1" action="" data-ajax="1">
				<input type="hidden" name="id" value="{$item.id}" />
				<div style="padding：30px;" class="am-u-sm-6">
					<div class="am-u-sm-12" style="padding-bottom: 10px;">
						<div class="am-u-sm-12">
							<label for="user-name" class="am-u-sm-2 am-form-label cl-p" style="line-height: 35px;" >名称： </label>
							<div class="am-form-group am-u-sm-10 ">
								<div class="am-u-sm-10">
									<input type="text" class="tpl-form-input" data-check="require|" name="role_name" value="{$item.role_name}" style="line-height: 21px;" />
								</div>
								<div class="am-u-sm-2 hint" style="padding: 5px;">
									
								</div>
							</div>
						</div>
					</div>
					<!--<div class="am-u-sm-12" style="padding-bottom: 10px;">
						<div class="am-u-sm-12">
							<label for="user-name" class="am-u-sm-2 am-form-label cl-p" style="line-height: 35px;">代号： </label>
							<div class="am-form-group am-u-sm-10">
								<div class="am-u-sm-10">
									<input type="text" class="tpl-form-input" data-check="require|" name="code" value="{$item.code}" style="line-height: 21px;" />
								</div>
								<div class="am-u-sm-2 hint" style="padding: 5px;"></div>
							</div>
							
						</div>
					</div>-->
					<input type="hidden" name="menus" class="menus" value="{$item.menus}"/>
					<div class="am-u-sm-12" style="padding-bottom: 10px;">
						<div class="am-u-sm-12">
							<label for="user-name" class="am-u-sm-2 am-form-label cl-p" style="line-height: 35px;">区域： </label>
							<div class="am-form-group am-u-sm-10">
								<div class="am-u-sm-10">
									<select name="area_id" data-am-selected="{btnWidth:'100%', btnSize: 'sm'}">
										{$area_ids}
									</select>
								</div>
								<div class="am-u-sm-2 hint" style="padding: 5px;"></div>
							</div>
						</div>
					</div>
					<div class="am-form-group am-u-sm-12">
						<div class="am-u-sm-12" style="padding-bottom: 10px;">
							<label for="user-weibo" class="am-u-sm-2 am-form-label am-text-truncate am-text-left">角色头像</label>
							<div class="am-u-sm-10 ">
							<div class="am-u-sm-10 ">
								<div class="am-form-group am-form-file showimg">
									<div class="tpl-form-file-img am-u-sm-6">
										<img src="{:CxImg($item.avatar)}" alt="">
									</div>
									<div class="am-u-sm-12">
									<button type="button" class="am-btn am-btn-danger am-btn-sm "><i class="am-icon-cloud-upload"></i> 添加图片</button>
									<input type="file" name="avatar" multiple="">
									</div>
								</div>
								</div>
							</div>
							</div>
						</div>
					<div class="am-u-sm-12" style="padding-bottom: 10px;">
						<div class="am-u-sm-12">
							<div class="am-u-sm-3"> &nbsp;</div>
							<div class="am-u-sm-6">
							<div id="addmenu" class="am-btn am-btn-primary am-radius" style="margin-top: -2px;">保存</div>
							<a href="{:url('index')}" id="closemenu" class="am-btn am-btn-primary am-radius" style="margin-top: -2px;">取消</a>
							</div>
							<div class="am-u-sm-3">&nbsp;</div>
						</div>
					</div>
				</div>
				<div class="am-u-sm-6">
					
					<ul id="ztreeid" class="ztree"></ul>
					
				</div>
		</form>
		</div>
	</div> 
</div>